﻿CREATE TABLE [dbo].[InOutSide] (
    [Id]                 INT              IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL,
    [CusId]              UNIQUEIDENTIFIER NOT NULL,
    [CompanyId]          INT              NOT NULL,
    [InSide]             VARCHAR (10)     NOT NULL,
    [In_Date]            DATETIME         CONSTRAINT [DF_InOutSide_In_Date] DEFAULT (getdate()) NOT NULL,
    [InSide_ProtectDate] DATETIME         NOT NULL,
    [CC_Id]              VARCHAR (MAX)    CONSTRAINT [DF_InOutSide_CC_Id] DEFAULT ('') NULL,
    [IfSide]             VARCHAR (10)     CONSTRAINT [DF_InOutSide_IfSide] DEFAULT ('') NULL,
    [If_Date]            DATETIME         NULL,
    [OutSide]            VARCHAR (50)     CONSTRAINT [DF_InOutSide_OutSide] DEFAULT ('') NULL,
    [Out_Date]           DATETIME         NULL,
    [Out_Memo]           NVARCHAR (MAX)   CONSTRAINT [DF_InOutSide_Out_Memo] DEFAULT ('') NULL,
    [DepId]              INT              NULL,
    CONSTRAINT [PK_InOutSide_Id] PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'客户编号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'InOutSide', @level2type = N'COLUMN', @level2name = N'CusId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'公司编号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'InOutSide', @level2type = N'COLUMN', @level2name = N'CompanyId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'转出时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'InOutSide', @level2type = N'COLUMN', @level2name = N'In_Date';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'InSide的写批注日期', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'InOutSide', @level2type = N'COLUMN', @level2name = N'InSide_ProtectDate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'该客户的电话呼出记录', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'InOutSide', @level2type = N'COLUMN', @level2name = N'CC_Id';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'接口人', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'InOutSide', @level2type = N'COLUMN', @level2name = N'IfSide';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'下发日期', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'InOutSide', @level2type = N'COLUMN', @level2name = N'If_Date';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'退回日期', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'InOutSide', @level2type = N'COLUMN', @level2name = N'Out_Date';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'退回原因', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'InOutSide', @level2type = N'COLUMN', @level2name = N'Out_Memo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'部门Id', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'InOutSide', @level2type = N'COLUMN', @level2name = N'DepId';

